package g2.routemaster.gui;

import g2.routemaster.gui.actions.AboutAction;
import g2.routemaster.gui.actions.AddPlayerAction;
import g2.routemaster.gui.actions.ExitAction;
import g2.routemaster.gui.actions.LoadGameAction;
import g2.routemaster.gui.actions.RestartGameAction;
import g2.routemaster.gui.actions.SaveGameAction;
import g2.routemaster.gui.actions.StartGameAction;
import g2.routemaster.gui.actions.Test2Action;
import g2.routemaster.gui.actions.TestAction;

import org.eclipse.jface.window.ApplicationWindow;

public class ActionCollection {
   private static ActionCollection instance;
   
   private AddPlayerAction addPlayerAction;
   private ExitAction exitAction;
   private AboutAction aboutAction;
   private StartGameAction startGameAction;
   private TestAction testAction;
   private Test2Action test2Action;
   private RestartGameAction restartAction;
   private LoadGameAction loadAction;
   private SaveGameAction saveAction;
   
   private ActionCollection() {
   }
   
   public static ActionCollection instance() {
      if (instance == null) {
         instance = new ActionCollection();
      }

      return instance;
   }
   
   void initialize(ApplicationWindow window) {
      aboutAction = new AboutAction(window);
      addPlayerAction = new AddPlayerAction(window);
      exitAction = new ExitAction(window);
      restartAction = new RestartGameAction(window);
      startGameAction = new StartGameAction(window);
      saveAction = new SaveGameAction(window);
      loadAction = new LoadGameAction(window);
      testAction = new TestAction(window);
      test2Action = new Test2Action(window);
   }

   /**
    * @return the exitAction
    */
   public ExitAction getExitAction() {
      return exitAction;
   }

   /**
    * @return the aboutAction
    */
   public AboutAction getAboutAction() {
      return aboutAction;
   }

   /**
    * @return the addPlayerAction
    */
   public AddPlayerAction getAddPlayerAction() {
      return addPlayerAction;
   }

   /**
    * @return the startGameAction
    */
   public StartGameAction getStartGameAction() {
      return startGameAction;
   }

   /**
    * @return the testAction
    */
   public TestAction getTestAction() {
      return testAction;
   }
   
   public Test2Action getTest2Action() {
      return test2Action;
   }

   /**
    * @return the restartAction
    */
   public RestartGameAction getRestartGameAction() {
      return restartAction;
   }

	public LoadGameAction getLoadAction() {
		return loadAction;
	}

	public SaveGameAction getSaveAction() {
		return saveAction;
	}

}
